<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
  <title>添加部门</title>
  <style>
    body { font-family: Arial, sans-serif; background-color: #f5f5f5; }
    .container { width: 500px; margin: 30px auto; padding: 20px; background: white; border-radius: 5px; box-shadow: 0 0 10px rgba(0,0,0,0.1); }
    h1 { text-align: center; color: #333; }
    .form-group { margin-bottom: 20px; }
    label { display: block; margin-bottom: 5px; font-weight: bold; color: #555; }
    input[type="text"] {
      width: 100%; padding: 10px; border: 1px solid #ddd; border-radius: 4px; box-sizing: border-box;
    }
    .btn-container { display: flex; justify-content: space-between; margin-top: 20px; }
    .btn { padding: 10px 20px; border: none; border-radius: 4px; cursor: pointer; font-size: 16px; }
    .btn-primary { background-color: #4CAF50; color: white; }
    .btn-secondary { background-color: #f44336; color: white; }
  </style>
</head>
<body>
<div class="container">
  <h1>添加新部门 </h1>

  <form action="addDepartment" method="post">
    <div class="form-group">
      <label for="deptName">部门名称:</label>
      <input type="text" id="deptName" name="deptName" required>
    </div>

    <div class="form-group">
      <label for="manager">管理人员:</label>
      <input type="text" id="manager" name="manager">
    </div>

    <div class="form-group">
      <label for="location">地点:</label>
      <input type="text" id="location" name="location">
    </div>

    <div class="btn-container">
      <button type="button" class="btn btn-secondary" onclick="window.location.href='departments'">返回</button>
      <button type="submit" class="btn btn-primary">添加部门</button>
    </div>
  </form>
</div>
</body>
</html>